﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="itemedit.aspx.cs" Inherits="weba.itemedit" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.4, Version=4.0.20133.145, Culture=neutral, PublicKeyToken=9b75583953471eea" Namespace="C1.Web.Wijmo.Controls.C1AutoComplete" TagPrefix="wijmo" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.4, Version=4.0.20133.145, Culture=neutral, PublicKeyToken=9b75583953471eea" Namespace="C1.Web.Wijmo.Controls.C1GridView" TagPrefix="wijmo" %>

<%@ Register assembly="C1.Web.Wijmo.Controls.4, Version=4.0.20133.145, Culture=neutral, PublicKeyToken=9b75583953471eea" namespace="C1.Web.Wijmo.Controls.C1Dialog" tagprefix="wijmo" %>

<%@ Register assembly="C1.Web.Wijmo.Controls.4, Version=4.0.20133.145, Culture=neutral, PublicKeyToken=9b75583953471eea" namespace="C1.Web.Wijmo.Controls.C1Expander" tagprefix="wijmo" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <style type="text/css">
        .glga {
            position: fixed;
            left: 10px;
            top: 10px;
        }
        #dck {
            width: 150px;
            overflow: visible;
        }
    </style>
    <script type="text/javascript" src="Scripts/jquery-1.8.2.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Path="bt.js" />
            </Scripts>
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <wijmo:C1AutoComplete ID="C1AutoComplete1" runat="server"></wijmo:C1AutoComplete>
                <asp:Button ID="Button1" runat="server" Text="搜索" />
                <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1" DataTextField="picurl" DataValueField="picurl" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                    <asp:ListItem>请选择图片</asp:ListItem>
                </asp:DropDownList>
                <br />
                <asp:Image ID="Image1" runat="server" Height="100px" ImageUrl="~/Images/1.gif" Width="100px" Visible="False" />
                <asp:Button ID="Button4" runat="server" OnClick="Button4_Click" Text="浏览所有图片" />
                <asp:Button ID="Button3" runat="server" Text="改为此图片" />
                 <wijmo:C1Dialog ID="C1Dialog1" runat="server" AppendTo="body" MaintainVisibilityOnPostback="False" Show="blind" Height="500px" Position="left,top" Width="570px" Visible="False">
                     <CollapsingAnimation Option="">
                     </CollapsingAnimation>
                     <ExpandingAnimation Option="">
                     </ExpandingAnimation>
                     <CaptionButtons>
                         <Pin IconClassOff="ui-icon-pin-s" IconClassOn="ui-icon-pin-w" />
                         <Refresh IconClassOn="ui-icon-refresh" />
                         <Minimize IconClassOn="ui-icon-minus" />
                         <Maximize IconClassOn="ui-icon-extlink" />
                         <Close IconClassOn="ui-icon-close" />
                     </CaptionButtons>
                     <Content>
                        <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" RepeatColumns="7">
                            <ItemTemplate>
                                <asp:ImageButton ID="ImageButton4" runat="server" Height="70px" ImageUrl='<%# "Images/"+ Eval("picurl") %>' OnClick="ImageButton1_Click" Width="70px" DescriptionUrl='<%# Eval("picurl") %>' />
                            </ItemTemplate>
                        </asp:DataList>
                     </Content>
                </wijmo:C1Dialog>
                <br />
                 <br />
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:mysjkConnectionString1 %>" SelectCommand="picsnotinitem" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                
                <wijmo:C1GridView ID="C1GridView1" runat="server" AllowPaging="True" AutogenerateColumns="False" DataKeyNames="id" DataSourceID="LinqDataSource1" GroupAreaCaption="将这里的一列拖去与那一列分组。" LoadingText="载入中..." OnSelectedIndexChanged="C1GridView1_SelectedIndexChanged" OnSelectedIndexChanging="C1GridView1_SelectedIndexChanging" OnRowCommand="C1GridView1_RowCommand">
                    
                <Columns>
                    
                    <wijmo:C1TemplateField>
                            
                        <ItemTemplate>
                                
                            <asp:CheckBox ID="CheckBox1"  runat="server" ClientIDMode="Static" OnCheckedChanged="CheckBox1_CheckedChanged" AutoPostBack="True" />
                            <asp:ImageButton ID="ImageButton3" runat="server" Height="50px" ImageUrl='<%# "Images/"+ Eval("imageUrl") %>' OnClick="ImageButton3_Click" Width="50px" CommandArgument='<%# Eval("id") %>' CommandName="getpic" />
                        </ItemTemplate></wijmo:C1TemplateField><wijmo:C1BoundField DataField="id" HeaderText="id" ReadOnly="True" SortExpression="id">
                        </wijmo:C1BoundField><wijmo:C1CheckBoxField DataField="visible" HeaderText="visible" SortExpression="visible">
                        </wijmo:C1CheckBoxField><wijmo:C1BoundField DataField="title" HeaderText="title" SortExpression="title">
                        </wijmo:C1BoundField><wijmo:C1BoundField DataField="description" HeaderText="description" SortExpression="description">
                        </wijmo:C1BoundField><wijmo:C1BoundField DataField="price" HeaderText="price" SortExpression="price">
                        </wijmo:C1BoundField><wijmo:C1CheckBoxField DataField="inStock" HeaderText="inStock" SortExpression="inStock">
                        </wijmo:C1CheckBoxField>
                    </Columns></wijmo:C1GridView>
                <asp:CheckBox ID="CheckBox2" runat="server" Text="全选" /><asp:CheckBox ID="CheckBox3" runat="server" Text="反选" />&nbsp;&nbsp<asp:Button ID="Button2" runat="server" Text="删除" />编辑所属类目<asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="title" DataValueField="id" RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged"></asp:CheckBoxList>
                <asp:Button ID="Button5" runat="server" Text="将选定产品归于所选类目" OnClick="Button5_Click1" />
                <asp:Button ID="Button6" runat="server" OnClick="Button6_Click1" Text="全部取消" />
                <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
                <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="weba.sjklqDataContext" EnableDelete="True" EnableInsert="True" EnableUpdate="True" EntityTypeName="" TableName="Item">
                </asp:LinqDataSource>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:mysjkConnectionString1 %>" SelectCommand="getctzwith" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdateProgress ID="UpdateProgress1" runat="server"></asp:UpdateProgress>
    </div>
    </form>
</body>
</html>
